/************************************************************
 * Filename: GameStateMgr.h
 * Purpose: Game state manager implementation.
 * (will probably get rid of this later)
 * Author: Jeremy Kings
 * Revision: 2 (17 November 2010)
 * Base: GameStateMgr.h - CS529 Project 3
 *
 * Copyright 2010, Digipen Institute of Technology
 ************************************************************/
#pragma once 

#include "GameStateList.h"
#include "System.h"
#include "ContainerIncludes.h"

#define FPS 30.0f

namespace Engine
{
	extern unsigned gGameStateInit;
	extern unsigned gGameStateCurr;
	extern unsigned gGameStatePrev;
	extern unsigned gGameStateNext;

	class GameStateManager
	{
	public:
		GameStateManager(GameState state);
		void AddSystem(System* sys);
		void RunLoop();
		~GameStateManager();

	private:
		// Game loop function prototypes
		void Load(void);
		void Init(void);
		void Update(void);
		void Free(void);
		void Unload(void);
		float CapFramerate();

	private:
		std::vector<System*> systems; // Game engine system list
		MessageHandler* handler; // message handler
		unsigned prevTime; // previous frame time
	};
}
